package com.aspose.cells;

class zbkl extends zck {
   zbkl(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
   }

   com.aspose.cells.b.a.b.a.ze a(com.aspose.cells.b.a.b.zq var1) {
      float var2 = 0.0F;
      float var3 = 0.0F;
      com.aspose.cells.b.a.b.a.ze var4 = new com.aspose.cells.b.a.b.a.ze();
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var2 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
         } else {
            var2 = Math.min(var1.h(), var1.i()) * 0.16F;
         }
      } else {
         var2 = Math.min(var1.h(), var1.i()) * 0.16F;
      }

      if (var2 <= 0.0F) {
         var4.b(var1);
         var4.i();
         return var4;
      } else {
         var3 = var2 * 2.0F;
         com.aspose.cells.b.a.b.zt var5 = new com.aspose.cells.b.a.b.zt(var3, var3);
         com.aspose.cells.b.a.b.zq var6 = new com.aspose.cells.b.a.b.zq(var1.d(), var5);
         com.aspose.cells.b.a.b.zo[] var7 = new com.aspose.cells.b.a.b.zo[5];
         if (var2 != 0.0F) {
            switch(this.e.b) {
            case 1:
               var7[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var7[1] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.g());
               var7[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var2 + var1.g());
               var7[3] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var7[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var6.a(var1.l() - var3);
               var4.a(var6, 270.0F, 90.0F);
               var4.a(var7[3], var7[4]);
               var4.a(var7[4], var7[0]);
               break;
            case 2:
               var7[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var7[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var7[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m() - var2);
               var7[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.m());
               var7[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var4.a(var7[0], var7[1]);
               var6.a(var1.l() - var3);
               var6.b(var1.m() - var3);
               var4.a(var6, 0.0F, 90.0F);
               var4.a(var7[4], var7[0]);
               break;
            case 3:
               var7[0] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.g());
               var7[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var7[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var7[3] = new com.aspose.cells.b.a.b.zo(var1.l() - var2, var1.m());
               var7[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m() - var2);
               var4.a(var7[0], var7[1]);
               var4.a(var7[1], var7[2]);
               var6.a(var1.l() - var3);
               var6.b(var1.m() - var3);
               var6.a(var1.j());
               var4.a(var6, 90.0F, 90.0F);
               break;
            case 4:
               var7[0] = new com.aspose.cells.b.a.b.zo(var2 + var1.f(), var1.g());
               var7[1] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.g());
               var7[2] = new com.aspose.cells.b.a.b.zo(var1.l(), var1.m());
               var7[3] = new com.aspose.cells.b.a.b.zo(var1.f(), var1.m());
               var7[4] = new com.aspose.cells.b.a.b.zo(var1.f(), var2 + var1.g());
               var4.a(var6, 180.0F, 90.0F);
               var4.a(var7[1], var7[2]);
               var4.a(var7[2], var7[3]);
            }
         }

         var4.i();
         return var4;
      }
   }

   void a() {
      com.aspose.cells.b.a.b.zq var1 = this.d(this.e.v());
      super.c(var1);
   }

   private com.aspose.cells.b.a.b.zq d(com.aspose.cells.b.a.b.zq var1) {
      float var2 = 0.0F;
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var2 = Math.min(var1.h(), var1.i()) * com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F;
         } else {
            var2 = Math.min(var1.h(), var1.i()) * 0.16F;
         }
      } else {
         var2 = Math.min(var1.h(), var1.i()) * 0.16F;
      }

      if (var2 <= 0.0F) {
         return var1;
      } else {
         com.aspose.cells.b.a.b.zq var3 = new com.aspose.cells.b.a.b.zq(var1.f(), var1.g(), var1.h(), var1.i());
         float var4 = var2 / 3.0F;
         float var5 = 0.0F;
         float var6 = 0.0F;
         float var7 = 0.0F;
         float var8 = 0.0F;
         switch(this.e.b) {
         case 1:
            var6 = var4;
            var7 = var4;
            break;
         case 2:
            var7 = var4;
            var8 = var4;
            break;
         case 3:
            var5 = var4;
            var8 = var4;
            break;
         case 4:
            var5 = var4;
            var6 = var4;
         }

         var3.a(var3.f() + var5);
         var3.c(var3.h() - var5);
         var3.c(var3.h() - var7);
         var3.b(var3.g() + var6);
         var3.d(var3.i() - var6);
         var3.d(var3.i() - var8);
         return var3;
      }
   }
}
